
public class e002 {
    public static void main(String[] args) {
		long sTime = System.currentTimeMillis();
        int[] fib = new int[100000];
        fib[1] = 1;
        fib[2] = 2;
        int sum = 2;
        for (int i = 3; fib[i-1] < 4000000; i++) {
            int n = fib[i-1] + fib[i-2];
            fib[i] = n;
            if (n % 2 == 0) {
                sum += n;
            }
        }
        System.out.println(sum);
		long fTime = System.currentTimeMillis();
		System.out.println("Time: " + (fTime - sTime) + "ms");
    }
}